package cn.mrcode.fd.blog.dao.mappercu;

import cn.mrcode.fd.blog.entity.Article;
import cn.mrcode.fd.blog.entityCu.ArticleCu;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author zhuqiang
 * @version V1.0
 * @date 2015/12/4 22:01
 */
public interface ArticleCuMapper {
    ArticleCu selectArticleDetailById(String id);
    List<ArticleCu> selectByAccount(String account);

    List<Article> selectSelective(Article article);

    /**
     * 获取指定文章的阅读数量
     * @param articleId
     * @return
     */
    Long selectReadNumById(String articleId);

    List<ArticleCu> selectTop(int i);
    List<ArticleCu> selectUserTop(@Param("top") int i,@Param("userAccount") String userAccount);

    List<ArticleCu> selectCuSelective(ArticleCu params);

    List<ArticleCu> selectCuSelectiveOrderBy(@Param("record") ArticleCu record, @Param("orderBy") String orderBy, @Param("sortType")String sortType);

    List<ArticleCu> selectListByCategory(String categoryId);
}
